/*
 * basic.h
 *
 *  Created on: Apr 12, 2010
 *      Author: Sequoyha
 */

//ALL ITEMS AND CLASSES CONTAINED IN THESE HEADERS ARE NAMED ONLY
//NO ACTUAL IMPLEMENTATION HAS BEEN PERFORMED, ARGUMENTS MAY AND WILL
//CHANGE DURING PRODUCTION
#ifndef WINERY_H_
#define WINERY_H_
#include "WineInfo.h"
#include "Distances.h"
#include "Menus.h"
#include<vector>
#include<iostream>
#include<iomanip>
#include<string>
using namespace std;

typedef vector<Distances> distFromHere; //A vector of Distances
typedef vector<WineInfo> wines;			//A vector of Wine Classes


class Winery
{
public:
	//CONSTRUCTORS---------------------------------------------------
	Winery();
	Winery(string, int, distFromHere, float, int, wines);
	//SETTERS--------------------------------------------------------
	void setWineryName(string name);
	void setWineryNumber(int);
	void setDistances(distFromHere);
	void setDistanceFromCV(float);
	void setNumberOfWines(int);
	void setStock(wines);
	void addNewWine(WineInfo); //WineMgr.h?
	void changePricing(); //WineMgr.h?
	//GETTERS--------------------------------------------------------
	string getWineryName();
	int getWineryNumber();
	distFromHere getDistances();
	float getDistanceFromCV();
	int getNumberOfWines();
	wines getStock();
	int getCount();
	float getClosestWinery();
	//FUNCTIONS & OPERATORS------------------------------------------
	//Sorts distance vector in order of closest to furthest from current
	void sortDistances();

	//Print functions - Print appropriate info to screen
	void PrintDistances();
	void PrintWines(); //for testing only as of now

	//Searches wines to find matching objects
	vector <WineInfo>::iterator SearchWines(string srchValue);

	//Operators - perform comparisons for sorts and searches
	bool operator<(const Winery& obj)const;
	bool operator==(int srchItem)const;
	Winery(const Winery &obj);
	static int totalWineries;
private:
	string wineryName;
	int wineryNumber;
	distFromHere current;
	distFromHere::iterator dfh;
	float fromCanyonVilla;
	int numberOfWines;
	wines wineInStock;//Maybe set to 10 since 10 is the max
	wines::iterator w;
	int wineryCount;
	float closest;
};
#endif /* WINERY_H_ */
